﻿@using kewcms.Areas.Admin.Models.ManageViewModels
@using kewcms.Areas.Admin.Views.Manage
@model kewcms.Areas.Admin.Models.ApplicationUser

@{
    ViewData["Title"] = "个人资料";
}

@if (TempData["message"] != null)
{
    <div class="alert alert-success fade in">
        <button type="button" class="close close-sm" data-dismiss="alert">
            <i class="fa fa-times"></i>
        </button>
        <strong>温馨提示!</strong> @TempData["message"]
    </div>
}

<div class="wrapper">
    <div class="row">
        <div class="col-md-12">
            <section class="panel">
                <div class="panel-heading">
                    <div class="panel-title">
                        个人资料
                    </div>
                </div>
                <div class="panel-body">
                    <form method="post" class="form-horizontal adminex-form">
                        <div class="form-group">
                            <label class="control-label col-md-3">头像</label>
                            <div class="col-md-6">

                                <!--dom结构部分-->
                                <div id="uploader-demo">
                                    <!--用来存放item-->
                                    <div id="fileList" class="uploader-list">
                                        @if (!string.IsNullOrWhiteSpace(Model.Pic))
                                        {
                                            <img src='@Model.Pic' style='max-height: 200px; margin: 10px 0;' id="sourcePic" />
                                        }
                                    </div>
                                    <div id="filePicker">选择图片</div>
                                </div>
                                <input type='hidden' asp-for="Pic" id="imgUrl" />

                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-3">用户名</label>
                            <div class="col-md-6">
                                <input type="text" asp-for="UserName" class="form-control" placeholder="">
                                <span asp-validation-for="UserName" class="text-danger"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-3">真实名称</label>
                            <div class="col-md-6">
                                <input type="text" asp-for="RealName" class="form-control" placeholder="">
                                <span asp-validation-for="RealName" class="text-danger"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-3">邮箱</label>
                            <div class="col-md-6">
                                <input type="text" asp-for="Email" class="form-control" placeholder="">
                                <span asp-validation-for="Email" class="text-danger"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-3">手机号码</label>
                            <div class="col-md-6">
                                <input type="text" asp-for="PhoneNumber" class="form-control" placeholder="">
                                <span asp-validation-for="PhoneNumber" class="text-danger"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-3">备注</label>
                            <div class="col-md-6">
                                <input type="text" asp-for="Note" class="form-control" placeholder="">
                                <span asp-validation-for="Note" class="text-danger"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-6 col-md-offset-3">
                                <button type="submit" class="btn btn-primary">保存</button>
                            </div>
                        </div>
                    </form>
                </div>
            </section>
        </div>
    </div>
</div>
@section Scripts {
    @await Html.PartialAsync("_ValidationScriptsPartial")
    <!--webuploader-->
    <script type="text/javascript" src="~/lib/ueditor/third-party/jquery-1.10.2.min.js"></script>
    <script src="~/lib/ueditor/third-party/webuploader/webuploader.min.js"></script>
    <script src="~/lib/ueditor/third-party/webuploader/webupload-pic.js"></script>
}